package server;

/*
生命周期事件类,封装相应事件传递给监听器
*/

/*
2023/2/7 该类内容全部写完,后续直接使用,无需修改
by cyl
 */

public class LifecycleEvent {
    private Object data = null;
    private Lifecycle lifecycle = null;
    private String type = null;
    public LifecycleEvent(Lifecycle lifecycle, String type) {
        this(lifecycle, type, null);
    }
    public LifecycleEvent(Lifecycle lifecycle, String type, Object data) {
        this.lifecycle = lifecycle;
        this.type = type;
        this.data = data;
    }

    //getter------------------------------------------------------------------------
    public Object getData() {
        return this.data;
    }
    public Lifecycle getLifecycle() {
        return this.lifecycle;
    }
    public String getType() {
        return this.type;
    }
}
